package main

import (
	"encoding/json"
	"fmt"
)

type People struct {
	Name string `json:"name"`
	Age  int    `json:"age,omitempty"`
	Sex  bool	`json:"sex"`
}

func main() {
	a := People{
		Name: "aa",
	}
	marshal, _ := json.Marshal(a)
	var b People
	_ = json.Unmarshal(marshal, &b)
	fmt.Println(b)
}
